<?php /* Smarty version Smarty-3.0.7, created on 2012-07-01 18:19:21
         compiled from "D:\wamp\www/template/templates\mc/transaction/seller/ordersheet/list.tpl" */ ?>
<?php /*%%SmartyHeaderCode:6064ff02429571a27-50603119%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    'a3431d68897dd84c99af44c29ccf9776caf4097b' => 
    array (
      0 => 'D:\\wamp\\www/template/templates\\mc/transaction/seller/ordersheet/list.tpl',
      1 => 1338968964,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '6064ff02429571a27-50603119',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<?php if (!is_callable('smarty_function_math')) include 'D:\wamp\www\library\package\smarty\plugins\function.math.php';
?><script type="text/javascript" src="/scripts/apps/mc/ordersheet/list.js"></script>
<form id="Form_Ordersheet" name="Form_Ordersheet" action="/exec.php?action=mc_transaction_seller_ordersheetlist" method="post" enctype="multipart/form-data">
    <table width="700" border="0" align="center" cellpadding="0" cellspacing="0" class="regBL">
    <tr>
        <td align="left" ><h2>订单管理</h2></td>
    </tr>
    </table>
    <br />
    <?php  $_smarty_tpl->tpl_vars["Row"] = new Smarty_Variable;
 $_from = ($_smarty_tpl->getVariable('Ordersheets')->value); if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
if ($_smarty_tpl->_count($_from) > 0){
    foreach ($_from as $_smarty_tpl->tpl_vars["Row"]->key => $_smarty_tpl->tpl_vars["Row"]->value){
?>
    <table width="700" border="0" align="center" cellpadding="2" cellspacing="0" style="border: solid #BEBEBE 1px; margin-bottom:10px;">
    <tr>
        <td width="25" height="25" align="center" valign="middle" bgcolor="#DEDEDE" style="border-bottom:solid #BEBEBE 1px;">
            <input type="checkbox" name="ID[]" id="ID" value="<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" />
        </td>
        <td width="672" valign="middle" bgcolor="#DEDEDE" style="border-bottom:solid #BEBEBE 1px;">
        	订单编号：<?php echo $_smarty_tpl->getVariable('Row')->value['OrderNumber'];?>
&nbsp;&nbsp;&nbsp;下单时间：<?php echo $_smarty_tpl->getVariable('Row')->value['Datetime'];?>
&nbsp;&nbsp;&nbsp;<?php echo $_smarty_tpl->getVariable('Row')->value['CompanyName_Buyer'];?>

		</td>
    </tr>	
    <tr>
        <td colspan="2" align="right" bgcolor="#EEEEEE">
        	<table width="695" border="0" align="right" cellpadding="0" cellspacing="0">
            <tr>
                <td width="528">
                	<?php unset($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']);
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['name'] = 'Supply';
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['loop'] = is_array($_loop=$_smarty_tpl->getVariable('Row')->value['Supplies']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['show'] = true;
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['max'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['loop'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['step'] = 1;
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['start'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['step'] > 0 ? 0 : $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['loop']-1;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['show']) {
    $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['total'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['loop'];
    if ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['total'] == 0)
        $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['show'] = false;
} else
    $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['total'] = 0;
if ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['show']):

            for ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['start'], $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration'] = 1;
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration'] <= $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['total'];
                 $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index'] += $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['step'], $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration']++):
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['rownum'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index_prev'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index'] - $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index_next'] = $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['index'] + $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['step'];
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['first']      = ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration'] == 1);
$_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['last']       = ($_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['iteration'] == $_smarty_tpl->tpl_vars['smarty']->value['section']['Supply']['total']);
?>   
                	<table width="528" border="0" cellpadding="1" cellspacing="0">
                    <tr>
                        <td width="84" height="95" align="center" valign="middle"><a href="exec.php?action=mc_transaction_seller_ordersheetsupply&id=<?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['ID'];?>
" target="_blank"><img src="<?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Thumbnail'];?>
" width="80" height="80" /></a></td>
                        <td width="177" align="left" valign="top">
                        	<table width="165" border="0" align="center" cellpadding="0" cellspacing="0">
                            <tr>
                            	<td height="2"></td>
                            </tr>
                            <tr>
                            	<td>
                                	<a href="exec.php?action=mc_transaction_seller_ordersheetsupply&id=<?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['ID'];?>
" target="_blank">
                            			<?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Title'];?>

                            		</a>
                            	</td>
                            </tr>
                            <tr>
                                <td>分类：
                                    <span id="ClassID_Text"><?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['ClassID'];?>
</span>
                                    -
                                    <span id="SubclassID_Text"><?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['SubclassID'];?>
</span>
                                    <input type="hidden" id="ClassID_Value" name="ClassID_Value" />
                                    <input type="hidden" id="SubclassID_Value" name="SubclassID_Value" />
                                </td>
                            </tr>
                        	</table>
                        </td>
                        <td width="80" align="center" style="border-left:solid #BEBEBE 1px;border-right:solid #BEBEBE 1px;">&yen;
                            <?php echo sprintf("%.2f",$_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Price']);?>
</td>
                        <td width="71" align="center" style="border-right:solid #BEBEBE 1px;"><?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Amount'];?>

                            /
                            <?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Unit'];?>
</td>
                        <td width="106" align="center" style="border-right:solid #BEBEBE 1px;">&yen;
                            <?php echo smarty_function_math(array('equation'=>"x*y+z",'x'=>$_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Price'],'y'=>$_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Amount'],'z'=>$_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Freight'],'format'=>"%.2f"),$_smarty_tpl);?>

                            <?php if ($_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Freight_Payer']=="BUYER"){?>
                            	<br/><span style="color:#999;">(买家承担：<?php echo $_smarty_tpl->getVariable('Row')->value['Supplies'][$_smarty_tpl->getVariable('smarty')->value['section']['Supply']['index']]['Freight'];?>
)</span>
                            <?php }else{ ?>
                            	<br/><span style="color:#999;">(卖家承担)</span>
                            <?php }?>
						</td>
                        </tr>
                		</table>
                        <?php endfor; endif; ?>
                </td>
                <td width="102" align="center" valign="middle" style="border-right:solid #BEBEBE 1px;" title="<?php echo $_smarty_tpl->getVariable('Row')->value['Status'];?>
">                                
                	<?php if ($_smarty_tpl->getVariable('Row')->value['Status_Description_Seller']!=''){?>
                    	<?php echo $_smarty_tpl->getVariable('Row')->value['Status_Description_Seller'];?>
<br/>
                    <?php }?>
                	<?php if ($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::000"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::001"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::002"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::003"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::004"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::005"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::999"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::998"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::997"){?>
                    	<a href="/exec.php?action=mc_transaction_seller_ordersheet&do=detail&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">订单详情</a><br />  
					<?php }else{ ?>
                    	状态异常                                                                                                                                                                    
                    <?php }?>
                </td>
                <td width="65" align="center" valign="middle" style="border-right:solid #BEBEBE 1px;">
                    <?php if ($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::999"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::998"||$_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::997"){?>
	                    <a href="/exec.php?action=mc_transaction_seller_ordersheet&do=delete&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">删除</a>                   
                    <?php }else{ ?>
                    	<a style="color:#C0C0C0">删除</a>
					<?php }?>                    
                    
                    <?php if ($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::000"){?>
                    	<br/>
                        <a href="/exec.php?action=mc_transaction_seller_ordersheet&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">确认订单</a><br />
                        <a href="/exec.php?action=mc_transaction_seller_ordersheet_close&ordernumber=<?php echo $_smarty_tpl->getVariable('Row')->value['OrderNumber'];?>
" target="_self">关闭订单</a>                        
                    <?php }elseif($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::002"){?>
	                    <br />
                    	<a href="/exec.php?action=mc_transaction_seller_ordersheet&do=detail&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">确认到账</a>  
                    <?php }elseif($_smarty_tpl->getVariable('Row')->value['Status']=="SERVICE::003"){?>  
                    	<br />                      
                        <a href="/exec.php?action=mc_transaction_seller_ordersheet&id=<?php echo $_smarty_tpl->getVariable('Row')->value['ID'];?>
" target="_self">发货</a>					                        
					<?php }?>                       
                </td>
                </tr>
        	</table>            
        </td>
    </tr>
    </table>
    <?php }} ?>    
    <table width="700" border="0" align="center" cellpadding="3" cellspacing="0">
    <tr>
        <td align="center" bgcolor="#DEDEDE"><?php echo $_smarty_tpl->getVariable('PageMenu')->value;?>
</td>
    </tr>
    </table>
    <br />
</form>